package com.xujp.cloud.service;

import com.xujp.common.entity.CommonResult;
import com.xujp.common.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Xjp
 * @version 1.0
 * @date 2021/5/2 下午 03:19
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    @PostMapping("/payment/query")
    public CommonResult query();

    @PostMapping(value = "/payment/insert", consumes = "application/json")
    public CommonResult insert(@RequestBody Payment payment);

    @PostMapping(value = "/payment/timeout")
    String paymentFeignTimeOut();

}
